home *** CD-ROM | disk | FTP | other *** search
/ USGS: Areas of Historica…Gas Exploration in the US / USGS Areas of Historical Oil and Gas Exploration in the US.iso / text / startmap_files / mm.js < prev    next >
Text File  |  2007-03-23  |  1KB  |  23 lines

  1. <!--
  2. function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  3.   if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
  4.     document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  5.   else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
  6. }
  7. MM_reloadPage(true);
  8.  
  9. function MM_findObj(n, d) { //v4.01
  10.   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  11.     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  12.   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  13.   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  14.   if(!x && d.getElementById) x=d.getElementById(n); return x;
  15. }
  16.  
  17. function MM_showHideLayers() { //v6.0
  18.   var i,p,v,obj,args=MM_showHideLayers.arguments;
  19.   for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
  20.     if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
  21.     obj.visibility=v; }
  22. }
  23. //-->